package smetana.domain.raw;

import java.sql.Date;
import com.google.common.base.Preconditions;
import smetana.domain.AbstractEntity;

import static org.apache.commons.lang.StringUtils.defaultString;

public class PositionGroup  extends AbstractEntity {
    private int id;
    private Date dateStart;
    private Date dateEnd;
    private String groupName;
    private int positionTypeId;
    private boolean isMajor;

    protected PositionGroup(){
        //used by iBatis.
    }

    public PositionGroup(int id){
        this.id = id;
    }

    @Override
    public int getId(){
        return this.id;
    }

    public void setId(int id){
        this.id = id;
    }
    public Date getDateStart(){
        return this.dateStart;
    }

    public void setDateStart(Date dateStart){
        this.dateStart = Preconditions.checkNotNull(dateStart);
    }
    public Date getDateEnd(){
        return this.dateEnd;
    }

    public void setDateEnd(Date dateEnd){
        this.dateEnd = Preconditions.checkNotNull(dateEnd);
    }
    public String getGroupName(){
        return defaultString(this.groupName);
    }

    public void setGroupName(String groupName){
        this.groupName = Preconditions.checkNotNull(groupName);
    }
    public int getPositionTypeId(){
        return this.positionTypeId;
    }

    public void setPositionTypeId(int positionTypeId){
        this.positionTypeId = positionTypeId;
    }
    public boolean getIsMajor(){
        return this.isMajor;
    }

    public void setIsMajor(boolean isMajor){
        this.isMajor = isMajor;
    }
}